# todo: 给定一段英文文本（单词间都是空格分隔），请编写一个函数，将每个单词的首字母转成大写。
# 输入: "auto school of witchcraft and wizardry"
# 输出: "Auto School Of Witchcraft And Wizardry"
text = "auto school of witchcraft and wizardry"
def small(text):
    result = " "
    a = True
    for i in text:
        if i == " ":
            result += i
            a = True
        elif a:
            result += i.upper()
            a = False
        else:
            result += i
    return result
print(small(text))